package cn.com.surker.production.entity;

import cn.com.surker.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 泵送合同补贴表
 * </p>
 *
 * @author admin
 * @since 2024-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ProductionPumpSubsidy extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 合同ID
     */
    private Long contractId;

    /**
     * 泵送类型
     */
    private Long pumpTypeId;

    /**
     * 泵送规格
     */
    private Long pumpNormId;

    /**
     * 生效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date takeTime;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss")
    private Date expireTime;

    /**
     * 补贴计算方式(0:方量1:次数)
     */
    private Integer countType;

    /**
     * 区间最小值,用于计算区间补贴的间最小值,通常为方量
     */
    private Double minValue;

    /**
     * 单价
     */
    private Double price;

    /**
     * 计算方式(0:补差量计算,1:实际量计算,2:按次计算,3:全量计算)
     */
    private Integer calcType;

    /**
     * 单价类型(0:补贴,1:运输价)
     */
    private Integer priceType;

    /**
     * 含税单价
     */
    private Double taxPrice;

    public ProductionPumpSubsidy(){}

    public ProductionPumpSubsidy(Long orgId, Long contractId, Long pumpTypeId, Long pumpNormId, Date takeTime,
                                 Integer countType, Double minValue, Double price, Integer calcType, Integer priceType) {
        this.orgId = orgId;
        this.contractId = contractId;
        this.pumpTypeId = pumpTypeId;
        this.pumpNormId = pumpNormId;
        this.takeTime = takeTime;
        this.countType = countType;
        this.minValue = minValue;
        this.price = price;
        this.calcType = calcType;
        this.priceType = priceType;
    }
}
